// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}
//-------------MAIN---------------
thread "PROJ5" 



REPEAT 
WAIT 0
IF 0AAB: file_exists "CLEO\KEYS.INI"
THEN         
    IF 0AF0: 12@ "CLEO\KEYS.INI" "SHOT_PEDS" "FIRE_KEY"         
    then break                                                                                
    else 0AF1: write_int 54 to_ini_file "CLEO\KEYS.INI" "SHOT_PEDS" "FIRE_KEY"                 
    end
END          
UNTIL IF 0AAB: file_exists "CLEO\KEYS.INI"
 
 
:LOOP5
WHILE TRUE
    wait 0 
    if Player.Defined($PLAYER_CHAR)
    JF CONTINUE
    if not Actor.Driving($PLAYER_ACTOR)
    JF CONTINUE
    if OR
       00E1:   player 0 pressed_key 17
       0AB0: 2
       0AB0: 12@ 
    jf continue
    0470: 11@ = actor $PLAYER_ACTOR current_weapon                       
    if or                                                                
    11@ >= 22                                                            
    34 >= 11@                                                           
    jf continue                                                               
    if or                                                           
    Actor.Animation($PLAYER_ACTOR) == "RIFLE_CROUCHFIRE"            
    Actor.Animation($PLAYER_ACTOR) == "RIFLE_FIRE"                  
    Actor.Animation($PLAYER_ACTOR) == "RIFLE_FIRE_POOR"             
    then
        GOTO @rocket_fire5
    else
        if or                                                         
        Actor.Animation($PLAYER_ACTOR) == "2guns_crouchfire"          
        Actor.Animation($PLAYER_ACTOR) == "Colt45_crouchfire"         
        Actor.Animation($PLAYER_ACTOR) == "Colt45_fire"                    
        Actor.Animation($PLAYER_ACTOR) == "Colt45_fire_2hands"        
        then                                                                   
            GOTO  @rocket_fire5                                      
        else                                                          
            if or                                                      
            Actor.Animation($PLAYER_ACTOR) == "UZI_CROUCHFIRE"         
            Actor.Animation($PLAYER_ACTOR) == "UZI_FIRE"               
            Actor.Animation($PLAYER_ACTOR) == "UZI_FIRE_POOR"          
            then                                                       
                GOTO @rocket_fire5                                   
            end                                                        
        end
    end
END


:rocket_fire5 
04C4: store_coords_to 1@ 2@ 0@ from_actor $PLAYER_ACTOR with_offset 0.0 1.3 0.0 
0376: 29@ = create_random_actor_at 1@ 2@ 0@

Actor.StorePos(29@, 21@, 22@, 23@)
0063: 1@ -= 21@ // (float)
0063: 2@ -= 22@ // (float)
0063: 0@ -= 23@ // (float)
GOSUB @GET_AIMING_POS5 // RETURNS AIMING AT POSITION TO: 0@ 1@ 2@
30@ = ACTOR.Angle($PLAYER_ACTOR)                                                                                                                                                                   
02F6: 10@ = sine 30@ // (float)                                                                                                                                                                      
02F7: 20@ = cosine 30@ // (float)                                                                                                                                                                  
20@ *= 90.0                                                                                                                                                                                           
10@ *= 90.0                                                                                                                                                                                             
10@ *= -1.0
2@ -= 10.5
083C: set_actor 29@ velocity_in_direction_XYZ 10@ 20@ 2@ 
Actor.RemoveReferences(29@)
wait 25 

:SHOT_5885
if 
   not ACTOR.DEAD(29@)
jf @SHOT_5D65 
6@ = ACTOR.Health(29@)
if OR 
ACTOR.DEAD(29@)
9 > 6@ 
jf @SHOT_5D65 
ACTOR.RemoveReferences(29@)

:SHOT_5D65
GOTO @LOOP5 

:GET_AIMING_POS5 // PASTE THIS AT THE END OF THE SCRIPT
Actor.StorePos($PLAYER_ACTOR, 1@, 2@, 3@)
0A9F: 5@ = current_thread_pointer 
5@ += 80 
0A8E: 6@ = 5@ + 12 // int 
0AA6: call_method 5327216 11989032 num_params 6 pop 0 6@ 5@ 3@ 2@ 1@ 4@  
if 
86BD:   not no_obstacles_between 1@ 2@ 3@ and 8@ 9@ 10@ solid 1 car 1 actor 1 object 1 particle 0 
else_jump @ADD5 
jump @END_POS5 

:ADD5
4@ += 1.0 
if
  4@ > 250.0 
else_jump @GET_AIMING_POS5 

:END_POS5
0@ = 0.0
1@ = 0.0
2@ = 0.0
005B: 0@ += 8@ // (float) 
005B: 1@ += 9@ // (float) 
005B: 2@ += 10@ // (float)
4@ = 0.0 // RESET THE AIM RADIUS  
return